Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
Python Tutorial
1) Buildin Function
2) Buildin Module
3) CGI Web
4) Class
5) Collections
6) Data Type
7) Database
8) Dictionary
9) File
10) Function
11) Introduction
12) List
13) Network
14) Operator
15) Regular Expressions
16) Statement
17) String
18) Thread
19) Tkinker
20) Tuple
21) Windows
22) Wxpython
23) XML
Dictionary
1) (Key) Membership (in, not in)
2) Add new key and value
3) Adding a Value to a Dictionary
4) Change value for existing key
5) Clear method removes all items from the dictionary
6) Compare dictionaries
7) Compare Dictionary Sizes
8) Compare with cmp()
9) Constructing a Dictionary
10) Copy method returns a duplicate shallow dictionary
11) Create dictionary from fromkeys() function
12) Create new dictionary from subset of keys
13) Create subset of keys
14) Creating, accessing and modifying a dictionary
15) Deleting Items from a Dictionary
16) Dict can be used with keyword arguments
17) Dictionaries may be created using the factory function dict()
18) Dictionary Keys Are Case-Sensitive
19) Dictionary methods
20) Dictionary Syntax
21) Fromkeys method creates a new dictionary with the given keys, each with a default corresponding value of None
22) Get list of keys
23) Get method is a way of accessing dictionary items
24) Get value by key
25) Get value from dictionary with default value
26) Access Values in Dictionaries
27) Remove Dictionary Elements and Dictionaries
28) Update Dictionaries
29) If you dont want to use None as the default value, you can supply your own default
30) Indexing a Dictionary
31) Items method returns all the items as a list of items in the form of (key, value)
32) Iterating Through a Dictionary
33) Iteritems method returns an iterator instead of a list
34) Keys() returns a list of the dictionarys keys
35) Len() returns the total number of items, that is, key-value pairs
36) Many to many dictionary
37) Mapping Type Related Functions with dict()
38) Mixing Data types in a Dictionary
39) Mixing the use of numbers and strings as keys
40) Modifying a Dictionary
41) Name and name would represent two completely distinct keys in the dictionary
42) One to many dictionary
43) Pop method returns the value corresponding to a given key, and then remove the key-value pair from the dictionary
44) Popitem pops off a random item
45) Retrieve value from key
46) Retrieving dictionary key list
47) Retrieving dictionary value list
48) Setdefault sets the value corresponding to the given key if it is not already in the dictionary
49) Setdefault()
50) Simple one to one dictionary
51) Sorted dictionary
52) String Formatting with Dictionaries
53) Swap keys for values
54) The Boolean has_key() and the in and not in operators are Boolean, returning True if a dictionary has that key and False otherw
55) The has_key method checks whether a dictionary has a given key
56) The keys, values, and items Functions
57) The update method updates one dictionary with the items of another
58) The values method returns a list of the values in the dictionary
59) To access individual dictionary elements, you use the familiar square brackets along with the key to obtain its value
60) To loop over the keys of a dictionary, you can use a plain for statement
61) Update() can be used to add the contents of one directory to another
62) Use the dict function to construct dictionaries from (key, value) pairs
63) Using Iterators with Sequences
64) Using the dictionary name will cause an iterator over that dictionary
65) You may supply your own default value